package com.thkj.business.complain.service.impl;

import com.thkj.business.complain.service.TblComplainService;
import dp.dao.PagingList;
import com.thkj.framework.base.BaseService;
import com.thkj.business.Complain.entity.TblComplain;

import java.util.Map;

import org.springframework.stereotype.Service;

@Service
public class TblComplainServiceImpl extends BaseService implements TblComplainService {


    public void insertTblComplain(TblComplain t){
        dao.insert("com.thkj.mapper.TblComplain.insert", t);
    }

    public int updateTblComplain(TblComplain t){
        int row = dao.update("com.thkj.mapper.TblComplain.update", t);
        return row;
    }

    public int deleteTblComplain(String t ){
        return dao.delete("com.thkj.mapper.TblComplain.delete", t);
    }

    public TblComplain getTblComplainById(String t){
        return dao.queryForObject("com.thkj.mapper.TblComplain.getById", t, TblComplain.class);
    }
    
    public PagingList<Map> query(int pageIndex, int pageSize, Map<String, Object> param) {
		return dao.queryForPagingList("com.thkj.mapper.TblComplain.query",param, pageIndex, pageSize, Map.class);
	}

	@Override
	public int solve(Map<String, Object> param) {
		return dao.update("com.thkj.mapper.TblComplain.solve", param);
	}


}